#ifndef GAME_H
#define GAME_H

#include "Singleton.h"

#include <QDebug>
#include <QList>
#include <QMap>
#include <exception>
#include <QTimer>
#include <QObject>
#include <iostream>

class Compositor {
  public:
    virtual void Handle() = 0;
    virtual ~Compositor(){}
protected:
    Compositor(){}
};

class Composition {
public:
    Composition(Compositor* c):_c(c){ Handle(); }
    virtual ~Composition(){ delete _c; }
    virtual void Handle(){
        _c->Handle();
    }
private:
    Compositor* _c;

};

class SimpleCompositor: public Compositor {
  public:
    virtual void Handle() {
        qInfo()<<"SimpleCompositor"<<__FUNCTION__;
    }
};

class TextCompositor: public Compositor {
  public:
    virtual void Handle() {
        qInfo()<<"TextCompositor"<<__FUNCTION__;
    }
};

#endif // GAME_H
